package org.example.taskmaster.fragments;

import android.app.DatePickerDialog;
import android.app.DatePickerDialog.OnDateSetListener;
import android.app.Dialog;
import android.app.DialogFragment;
import android.app.Fragment;
import android.os.Bundle;

public class DatePickerDialogFragment extends DialogFragment {
	// member data
	private Fragment mFragment;
	private int mYear;
	private int mMonth;
	private int mDay;
	// Constructor
	public DatePickerDialogFragment(Fragment callback, int  year, int month, int day) {
		mFragment = callback;
		mYear = year;
		mMonth = month;
		mDay = day;
	}
	// onCreateDialog
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		return new DatePickerDialog(getActivity(), (OnDateSetListener) mFragment, mYear,mMonth,mDay);
	}
}
